package com.test.springboot.jpa.service.impl;

import com.test.springboot.jpa.dao.UserDao;
import com.test.springboot.jpa.pojo.User;
import com.test.springboot.jpa.service.UserEasyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.transaction.Transactional;
import java.util.List;

/**
 * @author thinkpad - 83start
 * @version v1.0
 * @create 2022/8/18 18:11
 * @package com.test.springboot.jpa.service.impl
 * @description 文件说明
 */

@Service
public class UserEasyServiceImpl implements UserEasyService {
    @Autowired
    private UserDao userDao;

    @Override
    public List<User> findByUserPassword(String userPassword) {
        return userDao.findByUserPassword(userPassword);
    }

    @Override
    @Transactional
    public void  deleteByUserPassword(String userPassword) {
         userDao.deleteByUserPassword(userPassword);
    }

    @Override
    public long countByUserPassword(String userPassword) {
        return userDao.countByUserPassword(userPassword);
    }
}
